<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var price = prompt("请输入价格");
        var priceOff = prompt("请输入折扣（扣掉的比例，小数形式）");//扣掉的比例
        price = price*(1-priceOff);
        alert("现在的价格是"+price);
    </script>
</head>
<body>

</body>
</html>